package src.montecarlo;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import src.utils.*;

public class Testing {

	public static void main(String[] argvs) throws IOException{
		
		int sampleSize = 10000;
		double delta = 0.3;
		
		String outputFile = "metro.dat";
		ProbabilityDistributionFunction normal  = new NormalFunction(0,1);
		
		MetropolisMonteCarlo simulator = new MetropolisMonteCarlo(normal,sampleSize,delta, 0);
		
		Map<Double,Double> results = new HashMap<Double, Double>();
		
		/*
		for(double x=-10;x<10;x+=0.01){
			double y = simulator.normal(x, 0, 0.01);
			results.put(x, y);
		}
		
		Utils.printToFile(results, "normal-2-2.dat");
		*/
		
		double rejected = simulator.metropolisAlgorithm(outputFile);
		
		System.out.println(rejected);
		
	}
	
	
}
